import torch
import torch.nn as nn
import os
import sys
parent_path = os.path.dirname(sys.path[0])
if parent_path not in sys.path:
    sys.path.append(parent_path)
from _code import inceptionresnet, bninception

def main():
    model = inceptionresnet.inceptionresnetv2().cuda()
    # model.avgpool = nn.AdaptiveAvgPool2d(1)
    input = torch.rand(4, 3, 299, 299).cuda()
    x = model(input)
    # print(x.shape)
    print(x)
    __import__('ipdb').set_trace()

def t_bninception():
    model = bninception.bninception().cuda()
    # model.avgpool = nn.AdaptiveAvgPool2d(1)
    input = torch.rand(4, 3, 224, 224).cuda()
    x = model(input)
    print(x)
    print(x.shape)
    __import__('ipdb').set_trace()

def t_googlenet():
    from _code import GoogLeNet
    model = GoogLeNet.GoogLeNet().cuda()
    input = torch.rand(4, 3, 224, 224).cuda()
    x = model(input)
    print(x)
    print(x.shape)
    __import__('ipdb').set_trace()


if __name__ == "__main__":
    t_googlenet()
    t_bninception()
    main()
